package edu.algorithm.knn.parallel.common;

public class Utils {

	public static float similarScore(DataPoint first, DataPoint second) {

		double distance = 0;
		float[] firstF = first.getDatas();
		float[] secondF = second.getDatas();
		for (int i = 0; i < firstF.length; i++) {
			double temp = Math.pow(firstF[i], secondF[i]);
			distance = distance+temp;
		}
		return (float) Math.sqrt(distance);
	}

}
